<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateFinancingsTable extends Migration {

	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up()
	{
		Schema::create('financing', function(Blueprint $table)
		{
			$table->increments('id');
			$table->timestamps();
			//int 11 项目id 关联tyw_projects
			//修改project_id 为 related_id 如果type 为0 则此值为项目ID 类推
			$table->integer('related_id');
			//varchar 255 可行性报告文件名
			$table->string('canbe_report_file');
			//varchar 255 论证报告文件名
			$table->string('prove_report_file');
			//varchar 255 政府批文文件名
			$table->string('gov_agreement_file');
			//varchar 255 非财务性因素名称（前端不展示）
			$table->string('non_financial_name');
			//varchar 255 非财务性因素内容（前端不展示）
			$table->string('non_financial_content');

			//增加type字段 tinyint 0项目 1设备 2技术
			$table->tinyInteger("type");
			// 项目审核状态
			$table->tinyInteger("verify_state");
			$table->softDeletes();

		});
	}

	/**
	 * Reverse the migrations.
	 *
	 * @return void
	 */
	public function down()
	{
		Schema::drop('financings');
	}

}
